home *** CD-ROM | disk | FTP | other *** search
- /* mac06©1997,1998 by HNS/DSITRI hns@computer.org
- ** tar.h
- ** Tape ARchive record format
- */
-
- #pragma once
-
- #define BLKLEN 512
-
- #define TMAGIC "ustar"
- #define TMAGLEN 6
- #define TVERSION "00"
- #define TVERLEN 2
-
- typedef union tarblk
- {
- struct header
- {
- char name[100]; /* entry name */
- char mode[8]; /* octal string */
- char uid[8]; /* octal string */
- char gid[8]; /* octal string */
- char size[12]; /* octal string */
- char mtime[12]; /* octal string */
- char cksum[8]; /* octal string */
- char type; /* file type */
- char linkname[100]; /* linked to ... */
- char fill[2];
- char magic[TMAGLEN]; /* magic string */
- char uname[32]; /* full user name */
- char gname[32]; /* full group name */
- char devmajor[8];
- char devminor[8];
- } h;
- unsigned char data[BLKLEN];
- } TARBLK;
-
- #define TARHSZ sizeof(TARBLK)
-
- #define NAMELEN 100
-
- /* file types */
-
- #define REGTYPE 0 /* regular file */
- #define AREGTYPE '0' /* regular file */
- #define LNKTYPE '1' /* link */
- #define SYMTYPE '2' /* symbolic link */
- #define CHRTYPE '3' /* character device */
- #define BLKTYPE '4' /* block device */
- #define DIRTYPE '5' /* directory */
- #define FIFOTYPE '6' /* FIFO file */
- #define CONTTYPE /* */
-
- /* mode definitions */
-
- #define TSUID
- #define TSGID
- #define TSVTX
- #define TUREAD
- #define TUWRITE
- #define TUEXEC
- #define TGREAD
- #define TGWRITE
- #define TGEXEC
- #define TOREAD
- #define TOWRITE
- #define TOEXEC
-
-
- /* EOF */